#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2015-2019, Intel Corporation

#
# src/test/ex_libpmemobj/TEST12 -- unit test for libpmemobj examples
#

EX_PATH=../../examples/libpmemobj/pmemlog

. ../unittest/unittest.sh

# This test allocates 90M object. Flushing 90M under pmemcheck
# makes this test run forever...
configure_valgrind pmemcheck force-disable $EX_PATH

require_test_type medium

require_build_type debug nondebug

setup

expect_normal_exit $EX_PATH/obj_pmemlog_simple c $DIR/testfile1 \
	n t a:Hello a:World! n t w r n t v:Hello:World!:bar:foo n t w r \
	> out$UNITTEST_NUM.log 2>&1

check

pass
